package com.ruoyi.gybj.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gybj.mapper.AlarmDelApplyMapper;
import com.ruoyi.gybj.domain.AlarmDelApply;
import com.ruoyi.gybj.service.IAlarmDelApplyService;

/**
 * 报警删除申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-19
 */
@Service
public class AlarmDelApplyServiceImpl implements IAlarmDelApplyService 
{
    @Autowired
    private AlarmDelApplyMapper alarmDelApplyMapper;

    /**
     * 查询报警删除申请
     * 
     * @param id 报警删除申请主键
     * @return 报警删除申请
     */
    @Override
    public AlarmDelApply selectAlarmDelApplyById(Long id)
    {
        return alarmDelApplyMapper.selectAlarmDelApplyById(id);
    }

    /**
     * 查询报警删除申请列表
     * 
     * @param alarmDelApply 报警删除申请
     * @return 报警删除申请
     */
    @Override
    public List<AlarmDelApply> selectAlarmDelApplyList(AlarmDelApply alarmDelApply)
    {
        return alarmDelApplyMapper.selectAlarmDelApplyList(alarmDelApply);
    }

    /**
     * 新增报警删除申请
     * 
     * @param alarmDelApply 报警删除申请
     * @return 结果
     */
    @Override
    public int insertAlarmDelApply(AlarmDelApply alarmDelApply)
    {
        alarmDelApply.setCreateTime(DateUtils.getNowDate());
        return alarmDelApplyMapper.insertAlarmDelApply(alarmDelApply);
    }

    /**
     * 修改报警删除申请
     * 
     * @param alarmDelApply 报警删除申请
     * @return 结果
     */
    @Override
    public int updateAlarmDelApply(AlarmDelApply alarmDelApply)
    {
        alarmDelApply.setUpdateTime(DateUtils.getNowDate());
        return alarmDelApplyMapper.updateAlarmDelApply(alarmDelApply);
    }

    /**
     * 批量删除报警删除申请
     * 
     * @param ids 需要删除的报警删除申请主键
     * @return 结果
     */
    @Override
    public int deleteAlarmDelApplyByIds(Long[] ids)
    {
        return alarmDelApplyMapper.deleteAlarmDelApplyByIds(ids);
    }

    /**
     * 删除报警删除申请信息
     * 
     * @param id 报警删除申请主键
     * @return 结果
     */
    @Override
    public int deleteAlarmDelApplyById(Long id)
    {
        return alarmDelApplyMapper.deleteAlarmDelApplyById(id);
    }
}
